﻿using Authority.DataTransferObject.ActionAuthority;
using Authority.Doamin;
using Authority.IServices.Model.Action;

namespace Authority.ServiceImpls.Profile
{
    public class ActionAuthorityProfile : AutoMapper.Profile
    {
        public ActionAuthorityProfile()
        {
            CreateMap<AddActionModel, ActionAuthority>()
                .ForMember(m => m.DateAddTime, s => s.Ignore())
                .ForMember(m => m.DateUpTime, s => s.Ignore())
                .ForMember(m => m.IsDelete, s => s.Ignore())
                .ForMember(m => m.ID, s => s.Ignore());

            CreateMap<EditActionModel, ActionAuthority>()
                .ForMember(m => m.DateAddTime, s => s.Ignore())
                .ForMember(m => m.DateUpTime, s => s.Ignore())
                .ForMember(m => m.IsDelete, s => s.Ignore())
                .ForMember(m => m.ID, s => s.Ignore());

            CreateMap<ActionAuthority, ActionAuthoritytDTO>();
            CreateMap<ActionAuthority, ActionAuthorityListDTO>();
        }
    }
}
